import { createApp } from 'vue'
import App from './App.vue'
import Icon from './components/common/icon'
import { ConfigProvider, Spin, Col, Row, Form, Button, Input, Modal, Tabs, Table, Image, Space,
  Upload, Dropdown, Menu, Progress, Avatar, Radio, Popconfirm
} from 'ant-design-vue'
import VueClipboard from 'vue3-clipboard'
// import WattPCUI from 'wattpc-ui'
import 'ant-design-vue/dist/antd.css'
// import 'wattpc-ui/dist/style.css'
import './index.less'

let app = ''
const mountPoint = document.getElementById('root')

if (mountPoint && mountPoint.__vue_app__ !== undefined) {
  // console.log(mountPoint.__vue_app__._instance)
  app = mountPoint.__vue_app__._instance
} else {
  app = createApp(App)

  app
    .use(VueClipboard, {
      autoSetContainer: true,
      appendToBody: true,
    })
    .use(ConfigProvider)
    .use(Avatar)
    .use(Icon)
    .use(Spin)
    .use(Button)
    .use(Col)
    .use(Row)
    .use(Form)
    .use(Input)
    .use(Modal)
    .use(Tabs)
    .use(Table)
    .use(Image)
    .use(Radio)
    .use(Space)
    .use(Upload)
    .use(Dropdown)
    .use(Menu)
    .use(Progress)
    .use(Popconfirm)
    .mount('#root')
}


